{include file="public/header" /}

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>轮播图</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    <form method="get" name="formSearch" id="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>轮播图名称</dt>
                <dd><input class="txt" type="text" name="search_name" id="search_name" value="{$Request.param.search_name}" /></dd>
            </dl>
            <dl>
                <dt>所属位置</dt>
                <dd>
                    <select name="ap_address">
                        <option value='0'>请选择</option>
                        <option value='1' {if condition="$adv_address eq 1"}selected{/if}>客户端主页</option>
                        <option value='2' {if condition="$adv_address eq 2"}selected{/if}>客户端商城</option>
                        <option value='3' {if condition="$adv_address eq 3"}selected{/if}>服务端培训</option>
                    </select>
                </dd>
            </dl>
            <dl>
                <dt>所属分类</dt>
                <dd>
                    <select name="ap_id">
                        <option value='0'>请选择</option>
                        <option value='1' {if condition="$ap_id eq 1"}selected{/if}>文章类</option>
                        <option value='2' {if condition="$ap_id eq 2"}selected{/if}>视频类</option>
                        <option value='3' {if condition="$ap_id eq 3"}selected{/if}>满减</option>
                        <option value='4' {if condition="$ap_id eq 4"}selected{/if}>折扣</option>
                        <option value='5' {if condition="$ap_id eq 5"}selected{/if}>项目定制</option>
                    </select>
                </dd>
            </dl>

            <div class="btn_group">
                <input type="submit" class="btn" value="{$Think.lang.ds_search}">
                {if $filtered}
                <a style="margin-left: 87px;margin-top: -52px;" href="{:url('Advrotation/rotation_chart')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
                {/if}
            </div>
        </div>
    </form>
    <div class="fixed-empty"></div>
    <form method="post" id="store_form">
        <table class="ds-default-table">
            <thead>
            <tr class="thead">
                <th class="w300">轮播图名称</th>
                <th class="w300">轮播图位置</th>
                <th class="w300">所属分类</th>
                <th class="w200">宽（像素）</th>
                <th class="w200">高（像素）</th>
                <th class="w200">添加时间</th>
                <th class="align-center w300">{$Think.lang.ds_handle}</th>
            </tr>
            </thead>
            <tbody>
            {notempty name="adv_info"}
            {foreach name="adv_info" item="v"}
            <tr class="hover" >
                <td class="name">{$v.name}</td>
                <td class="name">
                    {if condition="($v.ap_address==1)"}客户端主页
                    {elseif condition="($v.ap_address==2)"}客户端商城
                    {elseif condition="($v.ap_address==3)"}服务端培训
                    {/if}
                </td>
                <td>
                    {if condition="($v.ap_type==1)"}文章类
                    {elseif condition="($v.ap_type==2)"}视频类
                    {elseif condition="($v.ap_type==3)"}满减
                    {elseif condition="($v.ap_type==4)"}折扣
                    {elseif condition="($v.ap_type==5)"}项目定制
                    {/if}
                </td>
                <td>{$v.width}</td>
                <td>{$v.height}</td>
                <td>{$v.time|date='Y-m-d H:i:s',###}</td>
                <td>
                    <a href="javascript:dsLayerOpen('{:url('Adv/rotation_detail',['adv_id'=>$v.id])}','{$Think.lang.ds_edit}-{$v.name}','1000px','780px')" class="dsui-btn-edit"><i class="iconfont"></i>查看详情</a>
                    <a href="javascript:dsLayerOpen('{:url('Adv/rotation_edit',['adv_id'=>$v.id])}','{$Think.lang.ds_edit}-{$v.name}','1000px','780px')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
                    <a href="javascript:dsLayerConfirm('{:url('Adv/rotation_del',['adv_id'=>$v.id])}','{$Think.lang.ds_ensure_del}',{$v.id})" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="no_data">
                <td colspan="15">{$ap_name}{$Think.lang.ds_no_record}</td>
            </tr>
            {/notempty}
            </tbody>
        </table>
    </form>
</div>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>